package cn.juni.controller;

import cn.juni.pojo.SysLog;
import cn.juni.service.ISysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author Juni
 * @date 2021/3/3
 */
@Controller
@RequestMapping("/sysLog")
public class SysLogController {

    @Autowired
    ISysLogService sysLogService;

    @RequestMapping("/findAll")
    public String findAll(Model model){
        List<SysLog> sysLogList = sysLogService.findAll();
        model.addAttribute("sysLogList",sysLogList);
        return "syslog-list";
    }
}
